<% if mobile? %>

<% content_for :mobile_menu do %>
<a href=""></a>
<% end %>
<% content_for :app_back do %>
<a href="javascript:void(0)" onclick="history.go(-1)">
  <i class="icon-arrow-left"></i>
</a>
<% end %>
<% content_for :app_title do %>
  <%= @designer.name %>
<% end %>
<% content_for :app_action do %>
<a href=""></a>
<% end %>

<div class="designers-show-mobile">
  <div class="designer">
    <div class="avatar">
      <%= get_designer_avatar(@designer) %>
      <button class="contact-btn" onclick="Detector.floatclick();return false;">联系咨询</button>
    </div>

    <div class="info">
      <h1><%= @designer.name %><small>已实名认证</small></h1>
      <h2><%= @designer.position %></h2>
      <hr>
      <p><%= @designer.description %></p>
    </div>
  </div>

  <div class="list">
    <% @design_cases.each do |c| %>
      <a href="<%= designer_design_case_path(@designer, c) %>" class="item">
        <%= get_case_first_img(c) %>
        <div class="infos">
          <h1><%= c.title %></h1>
          <div class="item-list">
            <div class="text-center">
              <h1><%= c.total_amount %>万</h1>
              <span>全屋花费</span>
            </div>
            <div class="text-center">
              <h1><%= c.area %></h1>
              <span>门窗面积</span>
            </div>
            <div class="text-center">
              <h1><%= c.budget %>万</h1>
              <span>门窗预算</span>
            </div>
          </div>
        </div>
      </a>
    <% end %>
  </div>
</div>

<% else %>

<section class="designers-show">
  <div class="row">
    <div class="col-sm-offset-1 col-sm-10">
      <%= render partial: 'home/part_title', locals: { icon: nil, href: nil, title: '设计师介绍', summary: 'DISCOUNT ZONE' } %>

        <div class="row margin-reset introduction">
          <div class="row margin-reset introduction-panel">
            <div class="col-sm-offset-1 col-sm-4 designer-head">
              <%= get_designer_avatar(@designer) %>
              <button class="contact-btn" onclick="Detector.floatclick();return false;">联系咨询</button>
            </div>
            <div class="col-sm-6 designer-info">
              <h1><%= @designer.name %></h1>
              <div class="post text-green"><%= @designer.position %></div>
              <hr style="border-style: dashed;">
              <h5>个人介绍</h5>
              <div class="info">
                <%= @designer.description %>
              </div>
              <div class="renzheng">
                <i class="fa fa-mobile"></i> 已实名认证
              </div>
            </div>
          </div>
        </div>
    </div>
  </div>

  <div class="row works">
    <div class="col-sm-offset-1 col-sm-10">
      <%= render partial: 'home/part_title', locals: { icon: nil, href: nil, title: '设计师作品', summary: 'DISCOUNT ZONE' } %>

        <div class="row">
          <% @design_cases.each do |c| %>
            <div class="col-xs-4 work">
              <a href="<%= designer_design_case_path(@designer, c) %>">
                <%= get_case_first_img(c) %>
              </a>
              <div class="work-info text-center">
                <a href=""><h1><%= c.title %></h1></a>
                <hr>
                <span>￥<%= format_currency(c.window_and_door_budget.to_f / c.area.to_f) %>/㎡（万元）</span>
              </div>
            </div>
          <% end %>

        </div>
    </div>
  </div>
</section>
<% end %>
